<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <ul class="nav">
    <li>沈阳</li>
    <li>地址</li>
    <li>姓名</li>
  </ul>
  <script>
    const lis = document.querySelectorAll('.nav li')
    console.dir(lis)
    for (let i = 0; i < lis.length; i++) {
      console.dir(lis[i])
    }
    lis[0].style.color = 'red'
  </script>
</body>

</html>